1. Field of the Invention
The present invention relates to an image coder and an image decoder which efficiently codes and decodes an inputted image.
2. Description of the Prior Art
FIG. 1 is a block diagram of a conventional image coder disclosed in, for example, the Proceeding of "Standardization on Video Coding for Visual telephony", SAKAE OKUBO, pp. 43-48, 1989, NTT Human Interface Laboratories in the Picture Coding Symposium (PCS J89). In FIG. 1, numeral 1 designates a subtracter for calculating a differential image Gs by subtracting a predicted image Ge from an inputted image Gi, numeral 2 designates a transforming unit for converting, by discrete cosine transformation, the differential image Gs calculated by the subtracter 2 and outputting the result as a conversion coefficient Gst of the differential image Gs, numeral 3 designates a quantizing unit for quantizing the conversion coefficient Gst outputted from the transforming unit 2 and outputting a quantized coefficient Gq and numeral 4 designates a coding unit for coding the quantized coefficient Gq outputted from the quantizing unit 3 and outputting a coded image Gc.
Further, numeral 5 designates a reverse quantizing unit for reverse-quantizing the quantized coefficient Gq outputted from the quantizing unit 3 and outputting a conversion coefficient Gqt, numeral 6 designates a reverse transforming unit for converting by the reverse discrete cosine transformation the conversion coefficient Gqt outputted from the reverse quantizing unit 5 and outputting an error image Gg, numeral 7 designates an adder for adding the predicted image Ge to the error image Gg outputted from the reverse transforming unit 6 and outputting a local decoded image Gk and numeral 8 designates a predicting unit for executing the motion compensation of the inputted image Gi in reference to the local decoded image Gk outputted from the adder 7 and determining the predicted image Ge.
Next, an explanation will be given of the operation of the conventional image coder illustrated in FIG. 1.
First, when the inputted image Gi to be coded is inputted to the subtracter 1, the subtracter 1 calculates the differential image Gs by subtracting the predicted image Ge outputted by the predicting unit 8 from the inputted image Gi and outputs the differential image Gs. EQU Differential image Gs=Inputted image Gi-Predicted image Ge
Next, when the differential image Gs is outputted from the subtracter 1, the transforming unit 2 converts, by discrete cosine transformation the differential image Gs to compress the amount of information of the differential image Gs and outputs the result as the conversion coefficient Gst of the differential image Gs.
Next, when the conversion coefficient Gst is outputted from the transforming unit 2, the quantizing unit 3 quantizes the conversion coefficient Gst and outputs the quantized coefficient Gq.
When the quantized coefficient Gq is outputted from the quantizing unit 3 in this way, the coding unit 4 generates the coded image Gc by coding the quantized coefficient Gq and outputs the coded image Gc to an image decoder (not illustrated). Further, in preparation for coding the next image at the next time, the reverse quantizing unit 5 calculates the conversion coefficient Gqt by reverse-quantizing the quantized coefficient Gq and thereafter, the reverse transforming unit 6 generates the error image Gg by converting, by reverse discrete cosine transformation, the converted coefficient Gqt.
Next, when the error image Gg is outputted from the reverse transforming unit 6, the adder 7 adds the predicted image Ge to the error image Gg and outputs the local decoded image Gk.
Next, when the local decoded image Gk is outputted from the adder 7, the predicting unit 8 determines the predicted image Ge by executing motion compensation for each frame of the inputted image Gi with reference to the local decoded image Gk and outputs the predicted image Ge to the subtracter 1.
The conventional image coder is constituted and operated as described above and therefore, even if a plurality of objects are present in one frame of the inputted image Gi, when the motions of the respective objects are the same, the error or the difference between the inputted image Gi and the predicted image Ge can be made comparatively small. However, the motion compensation of the inputted image Gi is executed in units of frames and therefore, when the motions of the respective objects are different from each other, the error or the difference between the inputted image Gi and the predicted image Ge is enlarged.
Further, in the case where a background image is hidden at the back of an object in respect of the local decoded image Gk and the background image emerges at the back of the object with respect of the inputted image Gi that is inputted currently, the error or the difference between the inputted image Gi and the predicted image Ge is enlarged since the background image is not present in the local decoded image Gk that is the reference image.